/**
 * 
 */
package com.jsync.ui;

import java.util.Calendar;

import com.jsync.model.ResourceProfile;
import com.jsync.model.ResourceType;
import com.jsync.system.ResourceMonitor;
import com.jsync.system.TimedResourceChangeThread;

/**
 * @author prabz
 *
 */
public class JSyncMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		ResourceMonitor rm = new ResourceMonitor();
		ResourceProfile rp = new ResourceProfile();
		rp.setSource("F:/Work/S1/trunk");
		rp.setSourceType(ResourceType.WINDOWS);
//		rp.setDestination("C:/test1");
//		rp.setDestType(ResourceType.WINDOWS);
		rp.setDestination("/shared/import/vols1home/pravindran/workspace410/release4.10.0");
		rp.setDestType(ResourceType.SFTP);
		rp.setDestinationUser("pravindran");
		rp.setDestinationPass("D0N0tDr0p");
		rp.setHost("tss1vbe0078.tshhosting.com");
		rp.setPort(22);
		rp.setFilters("*.class;.svn*;*.properties;");
		rm.setProfile(rp);

		Calendar timestamp = Calendar.getInstance();
		timestamp.add(Calendar.DATE, -1);
		TimedResourceChangeThread trc = new TimedResourceChangeThread();
		trc.setProfile(rp);		
		trc.setTimestamp(timestamp);
		(new Thread(trc)).start();
		
		// Start the monitor thread
		(new Thread(rm)).start();
		System.out.println("Main Thread exiting...");
	}

}
